//
//  FLSuccessCommitView.m
//  FeeLing
//
//  Created by 乔光玉 on 2019/1/14.
//  Copyright © 2019年 大仙儿飘. All rights reserved.
//

#import "FLSuccessCommitView.h"

@implementation FLSuccessCommitView




-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        [self initView];
    }
    return self;
}
-(void)initView{
    
    self.backgroundColor = [UIColor colorWithHexString:@"#27C97B"];
    UIImageView * icon =[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"提交成功"]];
    icon.frame = CGRectMake(19, 26, 28, 28);
    [self addSubview:icon];
    
    UILabel * labelone =[[UILabel alloc]init];
    labelone.frame = CGRectMake(66, 16, SCREENWIDTH-66, 25);
    labelone.textAlignment = NSTextAlignmentLeft;
    labelone.textColor = [UIColor colorWithHexString:@"#FFFFFF"];
    labelone.font = [UIFont fontWithName:@"PingFangSC-Medium" size: 18];
    labelone.text = NSLocalizedString(@"tijiaochenggong", nil);
    [self addSubview:labelone];
    
    
    UILabel * labeltwo =[[UILabel alloc]init];
    labeltwo.frame = CGRectMake(66, 42, SCREENWIDTH-66, 22);
    labeltwo.textAlignment = NSTextAlignmentLeft;
    labeltwo.textColor = [UIColor colorWithHexString:@"#FFFFFF"];
    labeltwo.font = [UIFont fontWithName:@"PingFangSC-Regular" size: 16];
    labeltwo.text = NSLocalizedString(@"thanksyourfaak", nil);
    labeltwo.numberOfLines = 0;
    NSArray *appLanguages = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"];
    NSString *languageName = [appLanguages objectAtIndex:0];
    
    if (![languageName containsString:@"zh"]) {
        
        labeltwo.frame = CGRectMake(66, 42, SCREENWIDTH-66, 22+16);
        labeltwo.font = [UIFont fontWithName:@"PingFangSC-Regular" size: 12];
    }
    [self addSubview:labeltwo];
    
    
}


@end
